/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horizon.map;

import horizon.collision.CollisionManager;
import horizon.tile.GrassTile;
import horizon.util.Vector2;

/**
 *
 * @author J_Laptop
 */
public class MapGenerator {
    
    public static Map getMap(int type){
        Map m = new Map();
        switch(type){
            
            case 0: 
                Tile[] t = new Tile[Map.tileSide * Map.tileSide];
                for(int i = 0 ; i < Map.tileSide ; i++){
                    
                    for(int n = 0 ; n < Map.tileSide ; n++){
                        
                        t[(i * Map.tileSide) + n] = new GrassTile("Grass" , m.collision);
                        m.collision.addEntity(t[(i * Map.tileSide) + n]);
                        
                    }
                    
                }
                Chunk chunk = new Chunk(t , new Vector2(0,0));
                
                m.addChunk(chunk , chunk.worldPosition);
                break;
            
        }
     
        return m;
    }
    
}
